package com.lagou.client;

import com.lagou.client.handler.RPCConsumer;
import com.lagou.service.IUserService;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author Administrator
 * @version 1.0
 * @date 2020/7/4 20:37
 */
@SpringBootApplication
public class ConsumerBoot {
    public static void main(String[] args) throws InterruptedException {
        //创建一个代理对象
        IUserService proxy = (IUserService)RPCConsumer.createProxy(IUserService.class);

        //循环给服务器写数据
        while (true){
            Thread.sleep(2000);
            String are_you_ok = proxy.sayHello("are you ok");
            System.out.println(are_you_ok);
        }
    }
}
